3.1.71 \(\int \csc ^2(c+d x) (a+b \sin ^2(c+d x)) \, dx\) [71]

Optimal. Leaf size=16 \[ b x-\frac {a \cot (c+d x)}{d} \]

[Out]

b*x-a*cot(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3091, 8} \begin {gather*} b x-\frac {a \cot (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^2*(a + b*Sin[c + d*x]^2),x]

[Out]

b*x - (a*Cot[c + d*x])/d

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3091

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[A*Cos[e +
 f*x]*((b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Dist[(A*(m + 2) + C*(m + 1))/(b^2*(m + 1)), Int[(b*Sin[e
+ f*x])^(m + 2), x], x] /; FreeQ[{b, e, f, A, C}, x] && LtQ[m, -1]

Rubi steps

\begin {align*} \int \csc ^2(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx &=-\frac {a \cot (c+d x)}{d}+b \int 1 \, dx\\ &=b x-\frac {a \cot (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 16, normalized size = 1.00 \begin {gather*} b x-\frac {a \cot (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^2*(a + b*Sin[c + d*x]^2),x]

[Out]

b*x - (a*Cot[c + d*x])/d

________________________________________________________________________________________

Maple [A]
time = 0.20, size = 22, normalized size = 1.38

method result size
derivativedivides \(\frac {-\cot \left (d x +c \right ) a +b \left (d x +c \right )}{d}\) \(22\)
default \(\frac {-\cot \left (d x +c \right ) a +b \left (d x +c \right )}{d}\) \(22\)
risch \(b x -\frac {2 i a}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}\) \(25\)
norman \(\frac {b x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+b x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {a}{2 d}-\frac {a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+2 b x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}\) \(127\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^2*(a+sin(d*x+c)^2*b),x,method=_RETURNVERBOSE)

[Out]

1/d*(-cot(d*x+c)*a+b*(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.51, size = 23, normalized size = 1.44 \begin {gather*} \frac {{\left (d x + c\right )} b - \frac {a}{\tan \left (d x + c\right )}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*sin(d*x+c)^2),x, algorithm="maxima")

[Out]

((d*x + c)*b - a/tan(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 32, normalized size = 2.00 \begin {gather*} \frac {b d x \sin \left (d x + c\right ) - a \cos \left (d x + c\right )}{d \sin \left (d x + c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*sin(d*x+c)^2),x, algorithm="fricas")

[Out]

(b*d*x*sin(d*x + c) - a*cos(d*x + c))/(d*sin(d*x + c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin ^{2}{\left (c + d x \right )}\right ) \csc ^{2}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**2*(a+b*sin(d*x+c)**2),x)

[Out]

Integral((a + b*sin(c + d*x)**2)*csc(c + d*x)**2, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 39 vs. \(2 (16) = 32\).
time = 0.48, size = 39, normalized size = 2.44 \begin {gather*} \frac {2 \, {\left (d x + c\right )} b + a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*sin(d*x+c)^2),x, algorithm="giac")

[Out]

1/2*(2*(d*x + c)*b + a*tan(1/2*d*x + 1/2*c) - a/tan(1/2*d*x + 1/2*c))/d

________________________________________________________________________________________

Mupad [B]
time = 13.36, size = 16, normalized size = 1.00 \begin {gather*} b\,x-\frac {a\,\mathrm {cot}\left (c+d\,x\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(c + d*x)^2)/sin(c + d*x)^2,x)

[Out]

b*x - (a*cot(c + d*x))/d

________________________________________________________________________________________